import 'package:flutter/material.dart';

class SliderHomePage extends StatefulWidget {
  @override
  _SliderHomePageState createState() => _SliderHomePageState();
}

class _SliderHomePageState extends State<SliderHomePage> {
  double value = 50;
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: Text('slider')),
      body: Column(
        mainAxisAlignment: MainAxisAlignment.center,
        children: [
          Text('圆形'),
          Container(
            height: 300,
            alignment: Alignment.center,
            child: SizedBox(
              width: 100,
              height: 100,
              child: CircularProgressIndicator(
                // 背景颜色
                backgroundColor: Colors.grey,
                // 前景色
                valueColor: AlwaysStoppedAnimation(Colors.blue),
              ),
            ),
          ),
          Text('线性进度条'),
          Container(
            height: 300,
            alignment: Alignment.center,
            child: LinearProgressIndicator(
              backgroundColor: Colors.grey,
              valueColor: AlwaysStoppedAnimation(Colors.blue),
            ),
          ),
        ],
      ),
    );
  }
}
